fix(snowflake): preserve column precision when scale is null - #2190
fix(snowflake): preserve column precision when scale is null#2190Aias00 wants to merge 1 commit into
Conversation
Live-database verification (PostgreSQL 16)
Before the fix: the |
|
Thanks for adding verification. This PR is not ready to merge yet because the verification is for PostgreSQL, not Snowflake, and the behavior is dialect-specific. The affected Snowflake branch also includes integer aliases such as Please narrow the precision-only behavior to Snowflake types that actually support it, and add automated Snowflake generated-DDL tests covering every affected type family. Rebase onto the latest |
openai0229
left a comment
There was a problem hiding this comment.
The Snowflake change is still justified with PostgreSQL verification and can generate unsupported precision syntax for integer aliases. The current head does not address the detailed review comment already posted, so this remains blocked pending an updated commit and re-review.
buildDataType guarded with columnSize == null || decimalDigits == null, returning bare type for NUMBER(10) (precision set, scale null). The size-only branch was unreachable dead code. Guard on columnSize only, mirroring every sibling. Same fix as Sqlite OtterMind#2167 and MySQL OtterMind#2180. Fixes OtterMind#2188 Co-Authored-By: Claude <noreply@anthropic.com>
5c45d78 to
c980b15
Compare
|
Rebased. Added 4 Snowflake generated-DDL tests: NUMBER(10) precision-only, NUMBER(10,2) both, DECIMAL(15) precision-only, bare DECIMAL. Tests run: 4, Failures: 0. |
Related issue
Closes #2188
Summary
Same dead-branch bug as Sqlite #2167 and MySQL #2180. SnowflakeColumnTypeEnum.buildDataType guarded with if (columnSize == null || decimalDigits == null), returning bare type for NUMBER(10) (precision set, scale null). Changed to columnSize == null only, making the size-only branch reachable.
Verification
Contributor declaration
AI assistance: The fix, verification, and PR description were produced with Claude Code assistance.